﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ProjectDirector.ViewModels.CustomerViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<table width="100%" 
        style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #C0C0C0"><tr><td style="width:55px;"><img src="../../Content/Images/bigimgs/158.png" width="50px" height="50px" alt="" /></td>
<td><span style="font-size:14px; font-weight:bold;">List of current client</span>
<div style="float:right;">
    <%: Html.ActionLink("[Create New Client]", "Create") %>
</div>

</td></tr>
</table> 

<table width="100%">
    <tr>
        <th align="left">
            CompanyName
        </th>
        <th align="left">
            Business Type
        </th>      
        <th align="left">
            Telephone
        </th>
        <th align="left">
            Email
        </th>
        <th align="left">
            Fax Number
        </th>
        <th align="left">
            WebSite
        </th>
        
        <th align="left">
            Date Created
        </th>        
        <th></th>
    </tr>

<% foreach (var item in Model.Customers) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.CompanyName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.BusinessType.BusinessTypeName) %>
        </td>
       

        <td>
            <%: Html.DisplayFor(modelItem => item.Telephone) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Email) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.FaxNumber) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.WebSite) %>
        </td>       
        <td>
            <%: Html.DisplayFor(modelItem => item.DateCreated) %>
        </td>        
        <td>
            <%: Html.ActionLink("Edit", "Edit", new { id=item.CustomerId }) %> |
            <%: Html.ActionLink("Details", "Details", new { id=item.CustomerId }) %> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.CustomerId }) %>
        </td>
    </tr>
<% } %>

</table>
</asp:Content>
